package problems;

import org.junit.Ignore;

@Ignore //not finished
public class Euler267 extends AbstractEuler {

	@Override
	public Number calculate() {
		//the smalles fraction f that could possibly yield 1e9 pounds after 1000 coin flips can be calculated
		//by assuming that winning all 1000 flips yields just 1e9 pounds. To calculate this number, we can consider
		//that every turn, the amount of money must increase by a factor of 1e9 ^ 1/1000 which is about 1.0209.
		//Multiplying your fortune by that amount means an f of ((1e9 ^ 1/1000) - 1) / 2), which is a little over 0.01.
		//In that case, the odds of obtaining 1e9 pounds are (1/2)^1000, because we need to win every single coin flip.
		//the upper bound for f is 1, trivially: you can't bet more than you have. Also, when you lose,
		//the game is over, so again, we need to win every flip, and the odds are again (1/2)^1000.
		
		//the rest of the question involves two parts: determining the optimum f, and then the odds of
		//becoming a billionaire after 1000 flips at that ratio.
		
		//suspicion: the optimum f is the one that gives the greatest value for E, the expected amount of money held
		//after a flip (and therefore also after 1000 flips). A couple of edge cases:
		//f = 0		-> ((1 + 1)			/ 2) = 1
		//f = 0.02	-> ((0.98 + 1.04)	/ 2) = 1.01
		//f = 0.5	-> ((0.5 + 2)		/ 2) = 1.25
		//f = 1		-> ((0 + 3)			/ 2) = 1.5


		return null;
	}

	@Override
	protected Number getCorrectAnswer() {
		// TODO Auto-generated method stub
		return null;
	}

}
